const mongoose = require("mongoose");

mongoose.connect("mongodb://47.101.203.177:10050/test", {
  useNewUrlParser: true,
});

const User = mongoose.model("users", {
  name: String,
  age: Number,
  email: String,
  password: String,
});

const imooc = new User({
  name: "imooc-test",
  age: 30,
  email: "imooc@imooc.com",
});

imooc.save().then(() => {
  console.log("save ok");
});
